﻿using LightCAD.Core.Elements;
using System.Collections.ObjectModel;

namespace LightCAD.Core
{
    public enum LcLevelType
    {
        /// <summary>
        /// 屋顶层
        /// </summary>
        RFloor,
        /// <summary>
        /// 地上楼层
        /// </summary>
        Floor,
        /// <summary>
        /// 地下楼层
        /// </summary>
        BFloor,
    }
    public class LcLevel : LcObject
    {
        public string Name { get; set; }
        /// <summary>
        /// 从零高度计算的绝对高度
        /// </summary>
        public double Elevation { get; set; }
        public double S_Elevation { get; set; }
        /// <summary>
        /// 本层高度
        /// </summary>
        public double Height { get; set; }
        public double S_Height { get; set; }

        public LcLevelType Type { get; set; }
        public int Index { get; set; }
        public List<LcDrawing> Drawings { get; set; }
        public LcLevel() { Drawings = new List<LcDrawing> { }; }

    }

    public class LcLevelCollection : KeyedCollection<long, LcLevel>
    {
        protected override long GetKeyForItem(LcLevel item)
        {
            return item.Id;
        }
    }
}